<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://java.sun.com/jsf/facelets"
   xmlns:h="http://java.sun.com/jsf/html"
   xmlns:c="http://java.sun.com/jsp/jstl/core"
   xmlns:cc="http://java.sun.com/jsf/composite/cc"
   xmlns:p="http://primefaces.org/ui"
   xmlns:comp="http://java.sun.com/jsf/composite">

   <comp:interface>
      <comp:attribute name="label" required="true" shortDescription="The label for the output"/>
      <comp:attribute name="value" required="false" type="java.lang.Boolean" shortDescription="The value for the output"/>
      <comp:attribute name="size" required="false" default="50" shortDescription="The value for the output"/>
      <comp:attribute name="required" required="false" default="false" type="java.lang.Boolean" shortDescription="The value for the output"/>
       <comp:attribute name="readonly" required="false" default="true" type="java.lang.Boolean" shortDescription="The field is read-only"/>
   </comp:interface>

    <comp:implementation>
        <h:panelGroup style="width:100%">
            <h:selectBooleanCheckbox
                id="checkbox"
                title="#{cc.attrs.label}"
                label="#{cc.attrs.label}"
                value="#{cc.attrs.value}"
                rendered="#{!cc.attrs.readonly}"/>
            <h:outputText value="#{cc.attrs.value ? 'True' : 'False'}" styleClass="width100pc" rendered="#{cc.attrs.readonly}" />
            <p:message id="msg" for="checkbox" showSummary="false" showDetail="false" display="icon" style="width:5%" />
        </h:panelGroup>
    </comp:implementation>
</ui:composition>
